#ifndef __KSVGEDITOR_UI_KBASICMENUSTRATEGY_H_
#define __KSVGEDITOR_UI_KBASICMENUSTRATEGY_H_

#include <QMenu>

#include "kexportshape.h"

namespace {
    std::vector<std::unique_ptr<KExportShape>> s_clipboardShapes;
}

class KDrawingGraphicsView;
class KMenuInfo;

class KBasicMenuStrategy
{
public:
	explicit KBasicMenuStrategy() = default;
	virtual ~KBasicMenuStrategy() = default;

	void setView(KDrawingGraphicsView* view);
	virtual void buildMenu(QMenu& menu, const KMenuInfo& info) = 0;

	void addGlobalActions(QMenu& menu);
	void addEditActions(QMenu& menu);
	void addLayerActions(QMenu& menu);
    void onSelectAll();
    void onCut();
    void onCopy();
    void onPaste();
    void onOverwrite();
    void onDelete();
    void onResetRotation();
    void onBringForward();
    void onSendBackward();
    void onBringToFront();
    void onSendToBack();

protected:
	KDrawingGraphicsView* m_pView = nullptr;

private:
    void normalizeZValues();
    bool hasClipboardShapes() const;

private:
    bool m_isCut=false;
};
#endif //__KSVGEDITOR_UI_KBASICMENUSTRATEGY_H_